package com.wangmei.service.serviceimpl;

import com.wangmei.mapper.OrderProductMapper;
import com.wangmei.model.OrderProduct;
import com.wangmei.service.AlipayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AlipayServiceImpl implements AlipayService {
    @Autowired
    OrderProductMapper orderProductMapper;
    @Override
    public void paySuccess(String oid) {
        OrderProduct orderProduct = orderProductMapper.selectByPrimaryKey(oid);
        orderProduct.setOstate(2);
        orderProduct.setIssuccess(1);
        orderProductMapper.updateByPrimaryKeySelective(orderProduct);
    }
}
